package cdu.bbs.bbsv2.mapper;

import cdu.bbs.bbsv2.domain.Topic;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;
import java.util.Map;

public interface TopicMapper {
    List<Topic> getTopics();
    List<Topic> getNotTop();
    int deleteTopicById(String id);
    int addTopic(Topic topic);

    List<Topic> getTopicsByCondition(Map<String, String> conditions);

    Topic getTopicById(String id);
    List<Topic> getTopicsByUserId(String userId);

    int updateTopicInfo(Topic topic);

    List<Topic> getTopicsTop();

    List<Topic> pageList(@Param("start") int start,@Param("pageSize") int pageSize);

    int getTotalCount();

    int deleteTopicByIds(String[] ids);

    int topTopicByIds(String[] ids);

    int deleteTopicByUserId(String id);


    int insertTopicCollection(String topicId,String userId);

    int removeTopicCollection(String topicId, String userId);

    int insertTopicThumb(String topicId, String userId);

    int removeTopicThumb(String topicId, String userId);

    List<Topic> getTopicsTest();

    List<Topic> getCollectionTopicsByUserId(String userId);

    List<Topic> getThumbTopicsByUserId(String id);
}
